{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "import geohash"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Unnamed: 0</th>\n",
       "      <th>Unnamed: 0.1</th>\n",
       "      <th>year</th>\n",
       "      <th>month</th>\n",
       "      <th>day</th>\n",
       "      <th>time_cat</th>\n",
       "      <th>time_num</th>\n",
       "      <th>time_cos</th>\n",
       "      <th>time_sin</th>\n",
       "      <th>day_cat</th>\n",
       "      <th>...</th>\n",
       "      <th>day_cos</th>\n",
       "      <th>day_sin</th>\n",
       "      <th>weekend</th>\n",
       "      <th>x_start</th>\n",
       "      <th>y_start</th>\n",
       "      <th>z_start</th>\n",
       "      <th>location_start</th>\n",
       "      <th>location_end</th>\n",
       "      <th>end_lat</th>\n",
       "      <th>end_lon</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>2018</td>\n",
       "      <td>1</td>\n",
       "      <td>20</td>\n",
       "      <td>10:0</td>\n",
       "      <td>0.425694</td>\n",
       "      <td>-0.892979</td>\n",
       "      <td>0.450098</td>\n",
       "      <td>Saturday</td>\n",
       "      <td>...</td>\n",
       "      <td>0.157050</td>\n",
       "      <td>-0.987591</td>\n",
       "      <td>1</td>\n",
       "      <td>-0.055090</td>\n",
       "      <td>0.712922</td>\n",
       "      <td>0.699076</td>\n",
       "      <td>wqp25w569</td>\n",
       "      <td>wqp25tkvt</td>\n",
       "      <td>33.779811</td>\n",
       "      <td>111.605885</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2018</td>\n",
       "      <td>2</td>\n",
       "      <td>12</td>\n",
       "      <td>17:30</td>\n",
       "      <td>0.736111</td>\n",
       "      <td>-0.087156</td>\n",
       "      <td>-0.996195</td>\n",
       "      <td>Monday</td>\n",
       "      <td>...</td>\n",
       "      <td>0.789543</td>\n",
       "      <td>0.613695</td>\n",
       "      <td>0</td>\n",
       "      <td>0.746854</td>\n",
       "      <td>-0.615984</td>\n",
       "      <td>-0.250546</td>\n",
       "      <td>ww4nj3h7m</td>\n",
       "      <td>ww4nj3u7r</td>\n",
       "      <td>34.814875</td>\n",
       "      <td>115.549374</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>2018</td>\n",
       "      <td>2</td>\n",
       "      <td>13</td>\n",
       "      <td>14:45</td>\n",
       "      <td>0.619444</td>\n",
       "      <td>-0.731354</td>\n",
       "      <td>-0.681998</td>\n",
       "      <td>Tuesday</td>\n",
       "      <td>...</td>\n",
       "      <td>0.116918</td>\n",
       "      <td>0.993142</td>\n",
       "      <td>0</td>\n",
       "      <td>0.762286</td>\n",
       "      <td>-0.641939</td>\n",
       "      <td>-0.082670</td>\n",
       "      <td>ww4jj4hfq</td>\n",
       "      <td>ww4nj9e9j</td>\n",
       "      <td>34.813136</td>\n",
       "      <td>115.559243</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>2018</td>\n",
       "      <td>2</td>\n",
       "      <td>13</td>\n",
       "      <td>17:15</td>\n",
       "      <td>0.724306</td>\n",
       "      <td>-0.160743</td>\n",
       "      <td>-0.986996</td>\n",
       "      <td>Tuesday</td>\n",
       "      <td>...</td>\n",
       "      <td>0.023061</td>\n",
       "      <td>0.999734</td>\n",
       "      <td>0</td>\n",
       "      <td>0.740919</td>\n",
       "      <td>-0.620137</td>\n",
       "      <td>-0.257816</td>\n",
       "      <td>ww4nj4rph</td>\n",
       "      <td>ww4nj9e9h</td>\n",
       "      <td>34.813141</td>\n",
       "      <td>115.559217</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "      <td>2018</td>\n",
       "      <td>2</td>\n",
       "      <td>13</td>\n",
       "      <td>18:0</td>\n",
       "      <td>0.754167</td>\n",
       "      <td>0.026177</td>\n",
       "      <td>-0.999657</td>\n",
       "      <td>Tuesday</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.003740</td>\n",
       "      <td>0.999993</td>\n",
       "      <td>0</td>\n",
       "      <td>0.752481</td>\n",
       "      <td>-0.608090</td>\n",
       "      <td>-0.252980</td>\n",
       "      <td>ww4nj9edj</td>\n",
       "      <td>ww4muu95u</td>\n",
       "      <td>34.786126</td>\n",
       "      <td>115.874361</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5 rows × 21 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "   Unnamed: 0  Unnamed: 0.1  year  month  day time_cat  time_num  time_cos  \\\n",
       "0           0             0  2018      1   20     10:0  0.425694 -0.892979   \n",
       "1           1             1  2018      2   12    17:30  0.736111 -0.087156   \n",
       "2           2             2  2018      2   13    14:45  0.619444 -0.731354   \n",
       "3           3             3  2018      2   13    17:15  0.724306 -0.160743   \n",
       "4           4             4  2018      2   13     18:0  0.754167  0.026177   \n",
       "\n",
       "   time_sin   day_cat     ...       day_cos   day_sin  weekend   x_start  \\\n",
       "0  0.450098  Saturday     ...      0.157050 -0.987591        1 -0.055090   \n",
       "1 -0.996195    Monday     ...      0.789543  0.613695        0  0.746854   \n",
       "2 -0.681998   Tuesday     ...      0.116918  0.993142        0  0.762286   \n",
       "3 -0.986996   Tuesday     ...      0.023061  0.999734        0  0.740919   \n",
       "4 -0.999657   Tuesday     ...     -0.003740  0.999993        0  0.752481   \n",
       "\n",
       "    y_start   z_start  location_start location_end    end_lat     end_lon  \n",
       "0  0.712922  0.699076       wqp25w569    wqp25tkvt  33.779811  111.605885  \n",
       "1 -0.615984 -0.250546       ww4nj3h7m    ww4nj3u7r  34.814875  115.549374  \n",
       "2 -0.641939 -0.082670       ww4jj4hfq    ww4nj9e9j  34.813136  115.559243  \n",
       "3 -0.620137 -0.257816       ww4nj4rph    ww4nj9e9h  34.813141  115.559217  \n",
       "4 -0.608090 -0.252980       ww4nj9edj    ww4muu95u  34.786126  115.874361  \n",
       "\n",
       "[5 rows x 21 columns]"
      ]
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "featuredDataset = pd.read_csv('featured-dataset_new_KNN.csv')\n",
    "featuredDataset.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Unnamed: 0</th>\n",
       "      <th>Unnamed: 0.1</th>\n",
       "      <th>year</th>\n",
       "      <th>month</th>\n",
       "      <th>day</th>\n",
       "      <th>time_cat</th>\n",
       "      <th>time_num</th>\n",
       "      <th>time_cos</th>\n",
       "      <th>time_sin</th>\n",
       "      <th>day_cat</th>\n",
       "      <th>...</th>\n",
       "      <th>day_sin</th>\n",
       "      <th>weekend</th>\n",
       "      <th>x_start</th>\n",
       "      <th>y_start</th>\n",
       "      <th>z_start</th>\n",
       "      <th>location_start</th>\n",
       "      <th>location_end</th>\n",
       "      <th>end_lat</th>\n",
       "      <th>end_lon</th>\n",
       "      <th>mon_num</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>2018</td>\n",
       "      <td>1</td>\n",
       "      <td>20</td>\n",
       "      <td>10:0</td>\n",
       "      <td>0.425694</td>\n",
       "      <td>-0.892979</td>\n",
       "      <td>0.450098</td>\n",
       "      <td>Saturday</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.987591</td>\n",
       "      <td>1</td>\n",
       "      <td>-0.055090</td>\n",
       "      <td>0.712922</td>\n",
       "      <td>0.699076</td>\n",
       "      <td>wqp25w569</td>\n",
       "      <td>wqp25tkvt</td>\n",
       "      <td>33.779811</td>\n",
       "      <td>111.605885</td>\n",
       "      <td>0.083333</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2018</td>\n",
       "      <td>2</td>\n",
       "      <td>12</td>\n",
       "      <td>17:30</td>\n",
       "      <td>0.736111</td>\n",
       "      <td>-0.087156</td>\n",
       "      <td>-0.996195</td>\n",
       "      <td>Monday</td>\n",
       "      <td>...</td>\n",
       "      <td>0.613695</td>\n",
       "      <td>0</td>\n",
       "      <td>0.746854</td>\n",
       "      <td>-0.615984</td>\n",
       "      <td>-0.250546</td>\n",
       "      <td>ww4nj3h7m</td>\n",
       "      <td>ww4nj3u7r</td>\n",
       "      <td>34.814875</td>\n",
       "      <td>115.549374</td>\n",
       "      <td>0.166667</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>2018</td>\n",
       "      <td>2</td>\n",
       "      <td>13</td>\n",
       "      <td>14:45</td>\n",
       "      <td>0.619444</td>\n",
       "      <td>-0.731354</td>\n",
       "      <td>-0.681998</td>\n",
       "      <td>Tuesday</td>\n",
       "      <td>...</td>\n",
       "      <td>0.993142</td>\n",
       "      <td>0</td>\n",
       "      <td>0.762286</td>\n",
       "      <td>-0.641939</td>\n",
       "      <td>-0.082670</td>\n",
       "      <td>ww4jj4hfq</td>\n",
       "      <td>ww4nj9e9j</td>\n",
       "      <td>34.813136</td>\n",
       "      <td>115.559243</td>\n",
       "      <td>0.166667</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>2018</td>\n",
       "      <td>2</td>\n",
       "      <td>13</td>\n",
       "      <td>17:15</td>\n",
       "      <td>0.724306</td>\n",
       "      <td>-0.160743</td>\n",
       "      <td>-0.986996</td>\n",
       "      <td>Tuesday</td>\n",
       "      <td>...</td>\n",
       "      <td>0.999734</td>\n",
       "      <td>0</td>\n",
       "      <td>0.740919</td>\n",
       "      <td>-0.620137</td>\n",
       "      <td>-0.257816</td>\n",
       "      <td>ww4nj4rph</td>\n",
       "      <td>ww4nj9e9h</td>\n",
       "      <td>34.813141</td>\n",
       "      <td>115.559217</td>\n",
       "      <td>0.166667</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "      <td>2018</td>\n",
       "      <td>2</td>\n",
       "      <td>13</td>\n",
       "      <td>18:0</td>\n",
       "      <td>0.754167</td>\n",
       "      <td>0.026177</td>\n",
       "      <td>-0.999657</td>\n",
       "      <td>Tuesday</td>\n",
       "      <td>...</td>\n",
       "      <td>0.999993</td>\n",
       "      <td>0</td>\n",
       "      <td>0.752481</td>\n",
       "      <td>-0.608090</td>\n",
       "      <td>-0.252980</td>\n",
       "      <td>ww4nj9edj</td>\n",
       "      <td>ww4muu95u</td>\n",
       "      <td>34.786126</td>\n",
       "      <td>115.874361</td>\n",
       "      <td>0.166667</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5 rows × 22 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "   Unnamed: 0  Unnamed: 0.1  year  month  day time_cat  time_num  time_cos  \\\n",
       "0           0             0  2018      1   20     10:0  0.425694 -0.892979   \n",
       "1           1             1  2018      2   12    17:30  0.736111 -0.087156   \n",
       "2           2             2  2018      2   13    14:45  0.619444 -0.731354   \n",
       "3           3             3  2018      2   13    17:15  0.724306 -0.160743   \n",
       "4           4             4  2018      2   13     18:0  0.754167  0.026177   \n",
       "\n",
       "   time_sin   day_cat    ...      day_sin  weekend   x_start   y_start  \\\n",
       "0  0.450098  Saturday    ...    -0.987591        1 -0.055090  0.712922   \n",
       "1 -0.996195    Monday    ...     0.613695        0  0.746854 -0.615984   \n",
       "2 -0.681998   Tuesday    ...     0.993142        0  0.762286 -0.641939   \n",
       "3 -0.986996   Tuesday    ...     0.999734        0  0.740919 -0.620137   \n",
       "4 -0.999657   Tuesday    ...     0.999993        0  0.752481 -0.608090   \n",
       "\n",
       "    z_start  location_start  location_end    end_lat     end_lon   mon_num  \n",
       "0  0.699076       wqp25w569     wqp25tkvt  33.779811  111.605885  0.083333  \n",
       "1 -0.250546       ww4nj3h7m     ww4nj3u7r  34.814875  115.549374  0.166667  \n",
       "2 -0.082670       ww4jj4hfq     ww4nj9e9j  34.813136  115.559243  0.166667  \n",
       "3 -0.257816       ww4nj4rph     ww4nj9e9h  34.813141  115.559217  0.166667  \n",
       "4 -0.252980       ww4nj9edj     ww4muu95u  34.786126  115.874361  0.166667  \n",
       "\n",
       "[5 rows x 22 columns]"
      ]
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "featuredDataset['mon_num'] = featuredDataset['month'].apply(lambda row: row/12.)\n",
    "featuredDataset.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {},
   "outputs": [],
   "source": [
    "columns_all_features = featuredDataset.columns\n",
    "columns_X = ['day_num', 'mon_num', 'x_start', 'y_start', 'z_start']\n",
    "columns_y = ['end_lat', 'end_lon']\n",
    "X = featuredDataset[columns_X]\n",
    "y = featuredDataset[columns_y]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {},
   "outputs": [],
   "source": [
    "from sklearn.model_selection import train_test_split\n",
    "X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.05)# test_size：0.05"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "X: (1495814, 5)\n",
      "y: (1495814, 2)\n",
      "X_train: (1421023, 5)\n",
      "y_train: (1421023, 2)\n",
      "X_test: (74791, 5)\n",
      "y_test: (74791, 2)\n"
     ]
    }
   ],
   "source": [
    "print ('X: ({}, {})'.format(*X.shape))\n",
    "print ('y: ({}, {})'.format(*y.shape))\n",
    "print ('X_train: ({}, {})'.format(*X_train.shape))\n",
    "print ('y_train: ({}, {})'.format(*y_train.shape))\n",
    "print ('X_test: ({}, {})'.format(*X_test.shape))\n",
    "print ('y_test: ({}, {})'.format(*y_test.shape))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {},
   "outputs": [],
   "source": [
    "from sklearn.neighbors import KNeighborsRegressor\n",
    "from sklearn.model_selection import GridSearchCV\n",
    "from sklearn.metrics import mean_squared_error"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Funtion for cross-validation over a grid of parameters\n",
    "\n",
    "def cv_optimize(clf, parameters, X, y, n_jobs=1, n_folds=5, score_func=None):\n",
    "    if score_func:\n",
    "        gs = GridSearchCV(clf, param_grid=parameters, cv=n_folds, n_jobs=n_jobs, scoring=score_func)\n",
    "    else:\n",
    "        gs = GridSearchCV(clf, param_grid=parameters, n_jobs=n_jobs, cv=n_folds)\n",
    "    gs.fit(X,y)\n",
    "    print (\"BEST\", gs.best_params_, gs.best_score_, gs.cv_results_)\n",
    "    best = gs.best_estimator_\n",
    "    return best"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "BEST {'n_neighbors': 3} -19.2106313342 {'mean_fit_time': array([ 1.28449655,  1.27426653,  1.27279406]), 'std_fit_time': array([ 0.02442379,  0.01739481,  0.01864014]), 'mean_score_time': array([ 4.42137208,  5.0237824 ,  5.47929144]), 'std_score_time': array([ 0.01878866,  0.05210238,  0.01564817]), 'param_n_neighbors': masked_array(data = [3 4 5],\n",
      "             mask = [False False False],\n",
      "       fill_value = ?)\n",
      ", 'params': [{'n_neighbors': 3}, {'n_neighbors': 4}, {'n_neighbors': 5}], 'split0_test_score': array([-19.15098948, -19.60008552, -20.11616158]), 'split1_test_score': array([-19.21519632, -19.61804741, -20.15151665]), 'split2_test_score': array([-19.22686243, -19.75222302, -20.21399632]), 'split3_test_score': array([-19.26701859, -19.75352486, -20.25518128]), 'split4_test_score': array([-19.19308998, -19.69089273, -20.20839927]), 'mean_test_score': array([-19.21063133, -19.68295465, -20.18905096]), 'std_test_score': array([ 0.03828487,  0.06468621,  0.04917628]), 'rank_test_score': array([1, 2, 3], dtype=int32), 'split0_train_score': array([ -8.53824209, -10.83202117, -12.61778855]), 'split1_train_score': array([ -8.50738735, -10.8146453 , -12.59681851]), 'split2_train_score': array([ -8.49997828, -10.81784179, -12.58985765]), 'split3_train_score': array([ -8.4998385 , -10.79507515, -12.56101041]), 'split4_train_score': array([ -8.52341215, -10.8135839 , -12.60689498]), 'mean_train_score': array([ -8.51377167, -10.81463346, -12.59447402]), 'std_train_score': array([ 0.01494584,  0.01180047,  0.01920661])}\n"
     ]
    }
   ],
   "source": [
    "# Create a k-Nearest Neighbors Regression estimator\n",
    "knn_estimator = KNeighborsRegressor()\n",
    "#knn_parameters = {\"n_neighbors\": [1,2,5,10,20,50,100]}\n",
    "knn_parameters = {\"n_neighbors\": [3, 4, 5]}\n",
    "knn_best = cv_optimize(knn_estimator, knn_parameters, X_train, y_train, score_func='neg_mean_squared_error')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "############# based on standard predict ################\n",
      "R^2 on training data: 0.85524373\n",
      "R^2 on test data:     0.67259719\n"
     ]
    }
   ],
   "source": [
    "# Fit the best Random Forest and calculate R^2 values for training and test sets\n",
    "knn_reg=knn_best.fit(X_train, y_train)\n",
    "knn_training_accuracy = knn_reg.score(X_train, y_train)\n",
    "knn_test_accuracy = knn_reg.score(X_test, y_test)\n",
    "print (\"############# based on standard predict ################\")\n",
    "print (\"R^2 on training data: %0.8f\" % (knn_training_accuracy))\n",
    "print (\"R^2 on test data:     %0.8f\" % (knn_test_accuracy))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Calculate the Root Mean Squared Error\n",
    "np.sqrt(mean_squared_error(knn_reg.predict(X_test),y_test))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "sampleds = pd.DataFrame(featuredDataset, columns=(columns_X + columns_y))\n",
    "sampleds = sampleds.sample(10)\n",
    "sampleds"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "y_pred = knn_reg.predict(sampleds.iloc[:,:-2])\n",
    "y_pred"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from sklearn.externals import joblib\n",
    "joblib.dump(knn_reg, 'k_nearest_model_11062304.pkl')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
